'use client'
import React, {useContext, useEffect} from "react";
import {ResourceContext} from "@/app/lib/ResourceContext";
import {useRouter} from "next/navigation";

export default function page(){
  
  const resources = useContext(ResourceContext);
  const navs = resources.navs;
  const router = useRouter();
  useEffect(():void => {
    if(!navs || navs.length == 0){
      return;
    }
    // @ts-ignore
    router.push(navs[0].route)
  }, [navs,router]);
  return <></>;
}